473,441 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

Javascript encryptor XOR

Is there some handy Javascript encryptor based on XOR algorithm? (html
page with encoded javascript will have a "decoder stub" prefixed before
the code that is actually executed.)

May 25 '06 #1
7 4117
po*******@softhome.net writes:
Is there some handy Javascript encryptor based on XOR algorithm? (html
page with encoded javascript will have a "decoder stub" prefixed before
the code that is actually executed.)


Undoubtedly. You can definitly pay for some, and there are probably also
some free versions floating around.

What you should ask yourself first is what you hope to achieve by
encoding. If it's security, then you should consider the threat model,
what you are trying to counter, including the likelyhood that the
deterrence will work and the cost if it fails.
I doubt there is any real gain to be had.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
May 25 '06 #2

Lasse Reichstein Nielsen писал(а):
po*******@softhome.net writes:
Is there some handy Javascript encryptor based on XOR algorithm? (html
page with encoded javascript will have a "decoder stub" prefixed
before
the code that is actually executed.)
--------------------------------------------------------
Undoubtedly. You can definitly pay for some, and there are probably also
some free versions floating around. What you should ask yourself first is what you hope to achieve by
encoding. If it's security, then you should consider the threat model,
what you are trying to counter, including the likelyhood that the
deterrence will work and the cost if it fails.
I doubt there is any real gain to be had. /L Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'

---------------------------------

well, what is some handy utility for encryption(obfuscation) without
any issues affecting on script functionality? Just make to difficult
reading if someone tries to explore source.

May 25 '06 #3
po*******@softhome.net wrote:
well, what is some handy utility for encryption(obfuscation) without
any issues affecting on script functionality? Just make to difficult
reading if someone tries to explore source.


Well, read the FAQ or the 10,000 posts to this group in the archive
discussing this topic.

Obfuscation is a mostly pointless exercise. Most people who think they need
to obfuscate really don't. They just haven't figured that out yet.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
May 25 '06 #4

Matt Kruse писал(а):

po*******@softhome.net wrote:
well, what is some handy utility for encryption(obfuscation) without
any issues affecting on script functionality? Just make to difficult
reading if someone tries to explore source.

----------------------------------------------------------------------------
Well, read the FAQ or the 10,000 posts to this group in the archive
discussing this topic. Obfuscation is a mostly pointless exercise. Most people who think they needto obfuscate really don't. They just haven't figured that out yet.
-- Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com

-----------------------------------------------------------
Amplification: I want find exact thing I need: XOR-based Javascript
encryptor.
(html page with encoded javascript will have a "decoder stub" prefixed
before
the code that is actually executed.) Simple and effective.

May 26 '06 #5

polych...@softhome.net wrote:
Amplification: I want find exact thing I need: XOR-based Javascript
encryptor.
(html page with encoded javascript will have a "decoder stub" prefixed
before
the code that is actually executed.) Simple and effective.


In my amateur opinion, you are unlikely to find XOR based encryption,
because XOR could produce characters not recognised by the web page
encoding (e.g. control characters in the 0x80 to 0x9F range).

Also if the "decoder stub" is prefixed, in what sense is it encrypted?
It would only stop the most casual user. Any person who was interested
in seeing your source, would also have the capability to easily extract
the code using the decoder stub provided.

For simple method of compacting your JS files (with the side effect of
mild obfuscation), including a "decompacting stub", see:-

<URL:http://dean.edwards.name/packer/>

Regards

Julian Turner

May 26 '06 #6

Julian Turner писал(а):
polych...@softhome.net wrote:
Amplification: I want find exact thing I need: XOR-based Javascript
encryptor.
(html page with encoded javascript will have a "decoder stub" prefixed
before the code that is actually executed.) Simple and effective.
In my amateur opinion, you are unlikely to find XOR based encryption,
because XOR could produce characters not recognised by the web page
encoding (e.g. control characters in the 0x80 to 0x9F range). Also if the "decoder stub" is prefixed, in what sense is it encrypted?
It would only stop the most casual user. Any person who was interested
in seeing your source, would also have the capability to easily extract
the code using the decoder stub provided. For simple method of compacting your JS files (with the side effect of
mild obfuscation), including a "decompacting stub", see:- <URL:http://dean.edwards.name/packer/> Regards Julian Turner

--------------------------
yes, it is true objection for characters not recognised by the web page
encoding.
As to prefixed "decoder stub", this method is used for XOR encryption
in more advanced solutions, where is necessary encrypt C code (mainly
to prevent AV). However, any decryptor can be placed before the
encrypted code.

May 26 '06 #7

mistral wrote:
As to prefixed "decoder stub", this method is used for XOR encryption
in more advanced solutions, where is necessary encrypt C code (mainly
to prevent AV). However, any decryptor can be placed before the
encrypted code.


Ahh, yes. With a bit of self-education, googling on "decode stub" gives
results in relation to:-

(a) Hiding viruses from Anti Virus software (as you say).

(b) Trying to hide/obfuscate .exe code in general. This seems to
receive the same treatment as hiding .js code. You can try, but there
are a lot of clever folks out there.

Regards

Julian Turner

May 26 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mistral | last post by:
I would like to implement a simple javascript code encryption(XOR, unicode, etc) using javascript. Could someone tell me where to find a ready javascript implementation of XOR (or of another very...
14
by: voipfc | last post by:
I am looking for a Javascript routine that allows the text to be encrypted only be the person viewing, the page,i.e the text of the page must be stored in an encrypted form and decrypted only by...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.